{$contents}

{literal}
<div style="text-align:left; padding:10px;">
<h2>DomFgL</h2>

<pre>
if( $$_GET['delete'] && $$item = ${className}::load( $$_GET['delete'] )){
	$$item->delete();
}
				
$$source = new DomArDataSource( ${className}::query()->orderBy('t.name DESC'), 40 );

$$panel = array(
	'title' => '${title}',
	'layout' => 'table',
	'layoutConfig' => array(
		'columns' => 1,
	),
	'items' => array(
		array(
			'type' => 'button',
			'title' => 'Lisa uus',
			'link' => $$this->getUrl('${manageMethod}/'),
		),
		array(
			'type' => 'grid',
			'source' => $$source,
			'fields' => array(
				array('key' => 'name', 'title' => 'Nimi'),
				array('type' => 'gridButton', 'value' => 'Muuda', 'link' => $$this->getUrl('${manageMethod}/'), 'title' => 'Valikud','colspan' => 2),
				array('type' => 'gridButton', 'value' => 'Kustuta', 'link' => $$this->getUrl('${function_container}/&delete='), 'confirmMessage' => 'Are you sure?' ),
			),
		),
	),
);
			
$$this->view->contents = DomFg::render( $$panel );

</pre>
</div>
{/literal}